package com.yxuan.springboot.mapper;

import com.yxuan.springboot.model.ControLineProvince;
import com.yxuan.springboot.model.ControlLine;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 
 * @author zchao
 *    ControlLineMapper层
 * @date 2023-05-21 13:22:40
 */
@Mapper
public interface ControlLineMapper extends BaseMapper<ControlLine> {
	@Select("select id,admission_province admissionProvince from control_line GROUP BY admission_province")
    List<ControLineProvince> getProvinceByGroup();
	@Select("select admission_province admissionProvince,admission_year AdmissionYear from control_line where admission_province = #{admission_province} GROUP BY admission_year ORDER BY admission_year desc")
    List<ControlLine> getYearByProvince(@Param("admission_province") String admissionProvince);
}
